package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.AppType;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.WxAttention;
import com.ygqh.baby.po.WxAttentionExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface WxAttentionMapper {
    int countByExample(WxAttentionExample example);

    int deleteByExample(WxAttentionExample example);

    int deleteByPrimaryKey(Long id);

    int insert(WxAttention record);

    int insertSelective(WxAttention record);

    List<WxAttention> selectByExample(WxAttentionExample example);

    WxAttention selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") WxAttention record, @Param("example") WxAttentionExample example);

    int updateByExample(@Param("record") WxAttention record, @Param("example") WxAttentionExample example);

    int updateByPrimaryKeySelective(WxAttention record);

    int updateByPrimaryKey(WxAttention record);

    int countSuper(String q);

    List<WxAttention> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

    List<WxAttention> selectAttentionList(@Param("startDate") Date startDate, @Param("ygSeoId") Integer ygSeoId, @Param("platformNo") String platformNo);

    List<WxAttention> selectAllAttention(@Param("startDate") Date startDate, @Param("ygSeoId") Integer ygSeoId, @Param("platformNo") String platformNo);

    List<WxAttention> selectListGroupByOpenId(@Param("recordFrom") AppType recordFrom,
                                              @Param("startDate") Date startDate, @Param("count") int count,
                                              @Param("platformNo") String platformNo);

    List<WxAttention> selectAttentionListNoOrder(@Param("startDate") Date startDate, @Param("ygSeoId") Integer ygSeoId, @Param("platformNo") String platformNo);

    int updateUpdateTimeById(@Param("id") Long id);

    WxAttention selectByOpenId(@Param("openId") String openId);

    List<WxAttention> selectByUser(@Param("level") Integer level, @Param("userType") String userType,
                                   @Param("startDate") Date startDate, @Param("ygSeoId") Integer ygSeoId, @Param("platformNo") String platformNo);

    List<WxAttention> selectByNewCustomer(@Param("startDate") Date startDate, @Param("ygSeoId") Integer ygSeoId, @Param("platformNo") String platformNo);

    WxAttention selectValidFormIdRecordByOpenId(@Param("openId") String openId, @Param("ygSeoId") Integer ygSeoId, @Param("limitDate") Date limitDate);
}
